Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
"POST /user/repos" does not support clientId/clientSecret basic authentication

I'm trying to create a Github Repository via an NPM package Octokit. I've set up the necessary oAuth stuff, but keep getting the same error:

HttpError: [@octokit/auth-oauth-app] "POST /user/repos" does not support clientId/clientSecret basic authentication.

import { Injectable } from '@nestjs/common';
import { Octokit } from "@octokit/rest";
import { createOAuthAppAuth } from "@octokit/auth-oauth-app";

@Injectable()
export class AppService {
  private auth() {
    return createOAuthAppAuth({
      clientType: "oauth-app",
      clientId: "xxxxxxxxxxxxxxx",
      clientSecret: "xxxxxxxxxxxxxxxxxxxxxxx",
    });
  };

  public async create() {
    const octokit = new Octokit({
      authStrategy: createOAuthAppAuth,
      auth: this.auth()
    });

    return await octokit.rest.repos.createForAuthenticatedUser({
      name: `repoName/${new Date().toString()}`
    }).then(({ data }) => { message: data });
  }

}

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I can't thank you enough for taking the time to come back and answer your own question! I was stuck in recursive README hell going through all of the octokit repos until I found your answer 😅

about 4 years ago · Juan Pablo Isaza Report

0

I just needed to add a Personal Access Token rather than going to oAuth way.

const octokit = new Octokit({
  auth: "mypersonalaccesstoken123",
});

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!